home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010306-20010921 / 000166_jaltman@watsun.cc.columbia.edu_Tue May 22 10:49:11 EDT 2001.msg < prev    next >
Text File  |  2020-01-01  |  2KB  |  44 lines

  1. Article: 12463 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!jaltman
  3. From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: testing a TCP port and logging response
  6. Date: 22 May 2001 04:04:31 GMT
  7. Organization: Columbia University
  8. Lines: 27
  9. Message-ID: <9ecogf$3jb$1@newsmaster.cc.columbia.edu>
  10. References: <3B09E25B.8117DD48@adelaide.edu.au>
  11. NNTP-Posting-Host: watsun.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 990504271 3691 128.59.39.2 (22 May 2001 04:04:31 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 22 May 2001 04:04:31 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12463
  16.  
  17. In article <3B09E25B.8117DD48@adelaide.edu.au>,
  18. Arthur Marsh  <arthur.marsh@adelaide.edu.au> wrote:
  19. : Hi, when using C-Kermit on a Unix machine to check that a service is
  20. : alive by running:
  21. : echo 'set port localhost 99'|kermit
  22. : the shell (ksh on Tru64 4.0E) seems to show the same status both for
  23. : successful connections and "connection refused" situations.
  24.  
  25. A couple of issues here.  first, you are using pipes so it is unclear
  26. which process generates the return code.  Second, you are not instructing
  27. Kermit to return a value.
  28.  
  29. : How would one set C-Kermit to test a TCP port, (waiting only a few
  30. : seconds for a response and not a long timeout), return a success/failure
  31. : status to the calling shell, and save any response from the connection
  32. : attempt to a file?
  33.  
  34. If you want to do this on the command line
  35.  
  36.   kermit -C "set host localhost 99, if failure exit 1, close, exit 0"
  37.  
  38.  Jeffrey Altman * Sr.Software Designer      C-Kermit 7.1 Alpha available
  39.  The Kermit Project @ Columbia University   includes Secure Telnet and FTP
  40.  http://www.kermit-project.org/             using Kerberos, SRP, and 
  41.  kermit-support@kermit-project.org          OpenSSL.  SSH soon to follow.
  42.